// JavaScript 合法
// console.log(i)

let i : undefined = undefined
console.log(i)

interface User {
    id: number;
    name: string;
    email?: string; // 等价于 email: string | undefined
}

let user: User = {
    id: 1,
    name: "Alice"
};

console.log(user);

let person:User =  {
    id: 2,
    name: "James",
    email:"James@163.com"
};

console.log(person);
